﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

using ManYan.Common.DomainInterface;

namespace ManYan.Domain.Model.Entity
{
    [Table("tb_users")]
    public class Users : IAggregationRoot
    {
        [Key]
        public Guid Id { get; set; }
        [Required]
        [MinLength(6)]
        [MaxLength(15)]
        public string? UserName { get; set; }
        /// <summary>
        /// 最小长度是6
        /// </summary>
        [MinLength(6)]
        public string? Password { get; set; }
        public string? Phone { get; set; }
        public string? Email { get; set; }
        public bool Emailverified { get; set; }
        public string? TrueName { get; set; }
        [MaxLength(18)]
        public string? IdCard { get; set; }
        public DateTime? Birthday { get; set; }
        public string? Introduction { get; set; }
        public string? OrganizationId { get; set; }

        [ForeignKey("UserId")]
        public WechatUser? wechatUser { get; set; }
    }
}
